package com.wcpdoc.base.dao.impl;

import com.wcpdoc.base.dao.TagInfoDao;
import com.wcpdoc.base.dao.TagUserDao;
import com.wcpdoc.base.entity.TagInfo;
import com.wcpdoc.base.entity.UserTagInfo;
import com.wcpdoc.core.dao.impl.RBaseDaoImpl;
import com.wcpdoc.core.entity.PageIn;
import com.wcpdoc.core.entity.PageOut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 用户数据访问层实现
 *
 * v1.0 zhanghc 2016-6-15下午17:24:19
 */
@Repository
public class TagUserDaoImpl extends RBaseDaoImpl<UserTagInfo> implements TagUserDao {
	private static final Logger log = LoggerFactory.getLogger(TagUserDaoImpl.class);


	@Override
	public void addTagUser(UserTagInfo userTagInfo) {
		add(userTagInfo);
	}

	@Override
	public UserTagInfo queryTagByTag(String userTagId,String tagId) {
		String sql = "SELECT * FROM user_tag WHERE userTagId = :userTagId  and tagId= :tagId ";
		return getEntity(sql, new Object[] { userTagId,tagId });
	}

	@Override
	public PageOut getListpage(PageIn pageIn) {
		return null;
	}

	@Override
	public List<Map<String, Object>> getListUser(String id) {
		return null;
	}
}
